package com.benshou.bsoa.controller;

import com.benshou.bsoa.common.dto.ResponseVo;
import com.benshou.bsoa.controller.req.TestEchoReq;
import com.benshou.bsoa.controller.rsp.TestEchoRsp;
import com.benshou.bsoa.service.TestService;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author <a href="mailto:liuzhenbang@benshou.com">Liu Zhenbang</a>
 */
@RestController
@RequestMapping("/test")
@RequiredArgsConstructor
public class TestController {

    private final TestService testService;

    @PostMapping("/echo")
    public ResponseVo<TestEchoRsp> echo(@Valid @RequestBody TestEchoReq req) {
        return testService.echo(req);
    }
}
